<?php
if (isset($_REQUEST['producto']) && ($_REQUEST['producto'] != "")){$id_art = $_REQUEST['producto']; } 
if (isset($_REQUEST['prestamo']) && ($_REQUEST['prestamo'] != "")){$id_art = $_REQUEST['prestamo']; } 
if (isset($_REQUEST['capital']) && ($_REQUEST['capital'] != "")){$id_art = $_REQUEST['capital']; } 
$id = $_REQUEST['id'];
$tipo = $_REQUEST['tipo'];

if (isset($_REQUEST['productoP']) && ($_REQUEST['productoP'] != "")){$id_art = $_REQUEST['productoP']; $id = $_REQUEST['clienteP'];
 
} 
unset($_REQUEST['capital']);
unset($_REQUEST['producto']);
unset($_REQUEST['prestamo']);

require_once('Connections/tecno.php'); 
include('scripts/fechaMysqlNormal.php');
 include('sql_detalle.php'); ?>
<table style="float:left;">
<tr>
		<td class='tituloTabla'>Giro</td>
		<td class='tituloTabla'>Monto</td>
		<td class='tituloTabla'>Vencimiento</td>
		<td class='tituloTabla'>&nbsp;</td>
</tr>
    <?php $f_actual = date("d-m-Y");
			   do {  ?>
<tr class="rowTabla">
        <td><?php echo $row_detallescliente['giro']; ?></td>
        <td><?php echo $row_detallescliente['monto']; ?></td>
        <td><?php echo $primera =cambiaf_a_normal($row_detallescliente['fechaV']); ?></td>
        <td align="left"><?php if ($row_detallescliente['status'] == 1){ ?>
        		<img src="images/iconos/Select.png" width="15" height="15" alt="Pagada" /><?php } ?>
                <?php if ($row_detallescliente['status'] == 2){ ?>
        		<img src="images/iconos/Warning.png" width="15" height="15" alt="Pagada" />Bs. <?php echo $row_detallescliente['abono'];  } ?>
				  <?php  $dias = compararFechas($primera,$f_actual);  
				  if ($dias < 0 and $row_detallescliente['status'] ==0){ ?>
                  <img src="images/iconos/Stop.png" width="15" height="15" alt="Vencida" /> <?php echo abs($dias); ?> d&iacute;as
                  <?php  } ?>
                  <?php if ($row_detallescliente['status'] == 3){ ?>
        		<img src="images/iconos/Info.png" width="15" height="15" alt="Eliminada" /> Por pronto pago<?php } ?>
		</td>
</tr>
    <?php } while ($row_detallescliente = mysql_fetch_assoc($detallescliente)); ?>
</table>